from scipy.spatial import procrustes

def procrustes_similarity(aligned_pts, target_pts):
    # 输入需为 Nx2 的数组
    _, _, disparity = procrustes(target_pts, aligned_pts)
    similarity = 1 - disparity  # 越接近1越相似
    return similarity
if __name__=="__main__":
    pass
    # similarity = procrustes_similarity(aligned_pts, faceData)
    # print(f"普氏相似度: {similarity:.4f}")